from selenium.webdriver.support.ui import Select


def open(context):
    context.driver.get('http://localhost:5173')
    context.driver.maximize_window()


def select(context, product):
    product_list = Select(context.driver.find_element('id', 'product-list'))
    product_list.select_by_visible_text(product)


def submit_button(context):
    return context.driver.find_element('id', 'submit')
